<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="f" uri="/flowpage-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title><s:property value="operate"/>从表示例</title>
	<%@include file="/share/header.jsp"%>
	<s:head/>
	<f:header theme="${sessionScope.skinCon.pageSkin}"/>	
  </head>
  <body>
	  	<s:actionerror/>
	    <s:form  action="save" namespace="/demo/child" validate="true" focusElement="domain.name">
	    	<s:textfield label="姓名" name="domain.name" readonly="%{readonly}" required="true" dataType="Limit" max="20" />
	    	<s:radio label="性别" name="domain.sex" noborder="true" readonly="%{readonly}" disabled="%{disabled}" required="true" list="getCodeItemList('sex')"  listKey="value" listValue="name" />
	    	<s:textfield label="出生日期" name="domain.birthday" readonly="%{readonly}" required="true"  dataType="Date" >
		    	<s:param name="value">
		    		<s:date name="domain.birthday" format="yyyy-MM-dd"/>
		    	</s:param>
	    	</s:textfield>
			<s:select label="状态" name="domain.state" emptyOption="true" readonly="%{readonly}" disabled="%{disabled}" list="getCodeItemList('yes_no')"  listKey="value" listValue="name" required="true"/>	    	
	    	<s:textarea label="备注" name="domain.remark"  readonly="%{readonly}" multipleheight="3" multiplewidth="2"/>
	    </s:form>
	    <script type="text/javascript">
	    	// post-submit callback 
	    	function postSubmit(parameters){
	    		var result=top.MyWindow.defaultPostSubmit(parameters);
	    		if(result && parameters.action==top.MyWindow.OkAdd.action){//确定并新增
	    			top.MyWindow.reload(parameters,'<s:url action='new' namespace='/demo/child'  includeParams="all" escapeAmp="false"><s:param name="domain.id" value="" /></s:url>');
	    			return false;
	    		}
	    		return result;
	    	}
	    </script>
  </body>
</html>
